<!--
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<kd-info-card>
  <kd-info-card-header>[[Details|Header in a detail view]]</kd-info-card-header>
  <kd-info-card-section name="[[Details|Details section header. Appears below main header.]]">
    <kd-object-meta-info-card object-meta="::$ctrl.job.objectMeta">
    </kd-object-meta-info-card>
    <kd-info-card-entry title="[[Images|Job images. Appears in details section.]]">
      <div ng-repeat="image in $ctrl.job.containerImages track by $index">
        <kd-middle-ellipsis display-string="{{::image}}"></kd-middle-ellipsis>
      </div>
      <div ng-repeat="image in $ctrl.job.initContainerImages track by $index">
        <kd-middle-ellipsis display-string="{{::image}}"></kd-middle-ellipsis>
      </div>
    </kd-info-card-entry>
    <kd-info-card-entry ng-if="::$ctrl.job.completions"
                        title="[[Completions|Job completions. Appears in details section.]]">
      {{::$ctrl.job.completions}}
    </kd-info-card-entry>
    <kd-info-card-entry title="[[Parallelism|Job parallelism. Appears in details section.]]">
      {{::$ctrl.job.parallelism}}
    </kd-info-card-entry>
  </kd-info-card-section>
  <kd-info-card-section name="[[Status|Job status. Appears in details section.]]">
    <kd-info-card-entry title="[[Pods|Pod status section header. Appears below main header.]]">
      <div>
        <div class="kd-comma-separated-item">
          {{::$ctrl.job.podInfo.running}} [[active|Status of active pods. Appears next to number of active pods.]]
          <!-- Collapse
          whitespace
      -->
        </div>
        <div class="kd-comma-separated-item">
          {{::$ctrl.job.podInfo.succeeded}} [[succeeded|Status of succeeded pods. Appears next to number of succeeded pods.]]
          <!-- Collapse
          whitespace
      -->
        </div>
        <div class="kd-comma-separated-item">
          {{::$ctrl.job.podInfo.failed}} [[failed|Status of failed pods. Appears next to number of failed pods.]]
        </div>
      </div>
    </kd-info-card-entry>
  </kd-info-card-section>
</kd-info-card>
